define(function () {
    return function (pane) {
        /**
         * 导航
         */
        {
            pane.html(utils.getHtml('default_table'));

            utils.addFilterGroupbtn(pane, {
                name: 'status',
                filters: dicts.status
            });

            utils.addFilterDropdown(pane, {
                text: '全部角色',
                name: 'role',
                dropdown: dicts.role
            });

            utils.addFilterDropdown(pane, {
                text: '全部级别',
                name: 'level',
                dropdown: dicts.user_level
            });

            utils.addFilterGroupbtn(pane, {
                text: '全部',
                name: 'agency_auto_settle',
                filters: [{value: "0", text: "手动结算"}, {value: "1", text: "自动结算"}]
            });

            utils.addFilterGroupbtn(pane, {
                text: '全部',
                name: 'inviter_id',
                filters: [{value: "", text: "没有邀请人"}]
            });

            utils.addFilterGroupbtn(pane, {
                text: '全部',
                name: 'subscribe',
                filters: [{value: "0", text: "未关注"}, {value: "1", text: "已关注"}]
            });

            utils.addFilterGroupbtn(pane, {
                text: '全部',
                name: 'sex',
                filters: [{value: "1", text: "男"}, {value: "2", text: "女"}]
            });
        }

        /**
         * 统计
         */
        {
            var analyse = function () {
                adminApi('users_analyse').then(function (rows) {
                    $('.content-header .filter-status[data-name="status"] .badge').text('');
                    var total = 0;
                    for (var i in rows) {
                        var row = rows[i];
                        $('.status-' + row.status, pane).text(row.count || 0);
                        total += (row.count || 0);
                    }
                    $('.status-all', pane).text(total);
                });
            }
            analyse();
        }

        //全局变量
        var fields_arrays = [
            ['nickname', 'text', '别名'],
            ['tel', 'text', '手机号码'],
            ['role', 'select', '角色', false, dicts.role],
            ['level', 'select', '用户级别', false, dicts.user_level],
            ['password', 'password', '密码', {notEmpty: {message: '密码不能为空'}}],
            ['email', 'text', '邮箱'],
            ['qq', 'text', 'QQ'],

            ['agency_id', 'text', '代理编号'],
            ['agency_at', 'text', '代理日期'],
            ['partner_id', 'text', '合伙人编号'],
            ['inviter_id', 'text', '邀请人编号'],

            ['session', 'text', 'session <a href="https://oauth.taobao.com/authorize?response_type=token&client_id=23196777&state=1212&view=web" target="_blank">获取</a>'],
            ['refresh_token', 'text', 'refresh_token']
        ];
        var addFields = utils.convertFields(fields_arrays),
            editFields = utils.convertFields(fields_arrays, ['password']);

        var agency_fields_arrays = [
            ['tao_user', 'text', '淘宝用户名'],
            ['pid', 'text', 'pid'],
            ['order_return_scale', 'text', '<span style="color: #00a65a;">订单返现比例</span>'],
            ['inviter_scale', 'text', '<span style="color: #f39c12;">邀请人返现比例</span>'],
            ['agency_scale', 'text', '<span style="color: #3c8dbc;">代理分成比例</span>'],
            ['inviter_agency_scale', 'text', '<span style="color: #3c8dbc;">上级代理分成比例</span>'],
            ['domain', 'text', '代理域名'],
            ['domain_pid', 'text', '域名pid'],
            ['qun_pid', 'text', '群pid'],
            ['agency_auto_settle', 'select', '代理自动结算', false, dicts.boolean],

            ['jd_user', 'text', '京东用户名'],
            ['jd_pid', 'text', '京东pid'],

            ['we_id', 'text', '微信模板编号'],
            ['qq_id', 'text', 'QQ模板编号'],
            ['order_return_limit', 'text', '订单最少返现'],
            ['first_return_scale', 'text', '首次返现比例'],
            ['first_return_limit', 'text', '首次最少返现'],
            ['return_quick', 'select', '下单立返', false, dicts.boolean],
            ['first_quick', 'select', '首次立返', false, dicts.boolean],
            ['view_level', 'text', '查看数据级别']
        ];
        var agencyFields = utils.convertFields(agency_fields_arrays);

        //日期处理
        var datepickers = {
            until: {
                format: 'yyyy-mm-dd',
                language: 'zh-CN'
            },
            agency_at: {
                format: 'yyyy-mm-dd',
                language: 'zh-CN'
            }
        }

        //初始化工具
        utils.addTools(pane, [
            {className: 'add-user-btn', icon: 'fa-plus', text: '添加用户'},
            {className: 'refresh-btn', icon: 'fa-refresh', text: '刷新'}
        ]);
        $(pane).on('click', '.add-user-btn', function () {
            utils.formAdd(table, {
                name: '用户', fields: addFields, columns: 6,
                datepickers: datepickers,
                fnServerData: function (paramData) {
                    return adminApi('users_add', paramData);
                }
            });
        }).on('click', '.refresh-btn', function () {
            if (table) {
                table.api().draw();
                analyse();
            }
        });

        //初始化表格
        var table = utils.dataTable(pane, {
            columns_arrays: [
                ["id", "#"],
                ["image", "头像", false, utils.imageRender()],
                ["nickname", "姓名", false],
                ["level", "用户级别", false, utils.dictRender('user_level')],
                ["status", "状态", false, utils.dictRender('status')],
                ["partner_id", "合伙人", false, function (i, t, row) {
                    var user = row.partner_user;
                    if (!user) {
                        return '';
                    }
                    return (user.image ? '<img src="' + user.image + '?imageView2/1/w/150/h/150/q/75"> ' : '') + '<div>' + (user.nickname || user.tel) + '</div><div>「ID:' + (user.id) + '」</div>';
                }, 'filterable'],
                ["agency_id", "代理", false, function (i, t, row) {
                    var user = row.agency_user;
                    if (!user) {
                        return '';
                    }
                    return (user.image ? '<img src="' + user.image + '?imageView2/1/w/150/h/150/q/75"> ' : '') + '<div>' + (user.nickname || user.tel) + '</div><div>「ID:' + (user.id) + '」</div>';
                }, 'filterable'],
                ["inviter_id", "邀请者", false, function (i, t, row) {
                    var user = row.inviter_user;
                    if (!user) {
                        return '';
                    }
                    return (user.image ? '<img src="' + user.image + '?imageView2/1/w/150/h/150/q/75"> ' : '') + '<div>' + (user.nickname || user.tel) + '</div><div>「ID:' + (user.id) + '」</div>';
                }, 'filterable'],
                ["invite_count", "邀请", true, function (invite_count) {
                    return '<div class="badge bg-teal">' + invite_count + '</div>';
                }],
                ["member_count", "粉丝", true, function (member_count) {
                    return '<div class="badge bg-teal">' + member_count + '</div>';
                }],
                ["agency_count", "下级", true, function (agency_count) {
                    return '<div class="badge bg-teal">' + agency_count + '</div>';
                }],
                ["order_count", "订单数", true, function (r, t, row) {
                    return '<div class="orders-opt" style="cursor: pointer;">' +
                        '<div>订单:<span class="badge bg-teal">' + row.order_count + '</span></div>' +
                        '<div>完成:<span class="badge bg-green">' + row.finish_count + '</span></div>' +
                        '<div>虚假:<span class="badge bg-red">' + row.sham_count + '</span></div></div>'
                }],
                ["frozen", "冻结", true, function (price) {
                    var price = parseFloat(price);
                    return '<div class="price finances-opt" style="cursor: pointer">' + price.toFixed(2) + '</div>';
                }],
                ["amount", "金额", true, function (price) {
                    var price = parseFloat(price);
                    return '<div class="price finances-opt" style="cursor: pointer">' + price.toFixed(2) + '</div>';
                }],
                ["level", "代理设置", false, function (r, t, row) {
                    var html = '<div style="min-width: 80px;"><div>查看级别:' + row.view_level + '</div>';
                    if (r === 'Partner' || r === 'Agency') {
                        html += (row.order_return_limit ? '<div>最少返现: ' + row.order_return_limit + '</div>' : '') +
                            (row.first_return_scale ? '<div>首次比例: ' + row.first_return_scale + '</div>' : '') +
                            (row.first_return_limit ? '<div>首次最少: ' + row.first_return_limit + '</div>' : '') +
                            (row.return_quick ? '<div>下单立返:' + row.return_quick + '</div>' : '') +
                            (row.first_quick ? '<div>首次立返:' + row.first_quick + '</div>' : '') +
                            '<div>自动结算:' + utils.dictRender('boolean')(row.agency_auto_settle) + '</div>' +
                            '<div>返现比例: <span class="badge" style="background-color: #00a65a!important; cursor: pointer;">' + row.order_return_scale + '</span></div>' +
                            '<div>邀请人返现:<span class="badge" style="background-color: #f39c12!important; cursor: pointer;">' + row.inviter_scale + '</span></div>' +
                            '<div>代理分成:<span class="badge" style="background-color: #3c8dbc!important; cursor: pointer;">' + row.agency_scale + '</span></div>' +
                            '<div>上级代理分成:<span class="badge" style="background-color: #3c8dbc!important; cursor: pointer;">' + row.inviter_agency_scale + '</span></div>' +
                            '<div>收入比例:<span class="badge" style="background-color: #dd4b39!important; cursor: pointer;">' + (90 - row.order_return_scale - row.inviter_scale - row.agency_scale - row.inviter_agency_scale).toFixed(2) + '</span></div>' +

                            '<div>' + (row.tao_user || '') + '</div>' +
                            '<div>' + (row.pid || '') + '</div>' +
                            '<div>' + (row.domain_pid ? ('域:' + row.domain + '<br>' + row.domain_pid) : '') + '</div>' +
                            '<div>' + (row.qun_pid ? ('群:' + row.qun_pid) : '') + '</div>' +
                            '<div>' + ((row.jd_user || row.jd_pid) ? ('京东:' + (row.jd_user || '') + ' - ' + (row.jd_pid || '')) : '') + '</div>';
                    }
                    return html += '</div>';
                }],
                ["agency_at", "代理日期", true, utils.dateRender()],
                ["created_at", "创建时间", false, utils.dateTimeRender()]
            ],
            sorting: [[0, 'desc']],
            fnServerData: function (paramData) {
                return adminApi('users_browse', paramData);
            }
        });

        //编辑开关
        var toggleHandler = utils.toggleChild(pane, 0, function (checked) {
            table.api().rows().every(function (idx) {
                var child = this.child, data = this.data();
                if (checked == 1) {
                    var opts = [
                        {text: '编辑头像', icon: 'fa-image', className: 'image-ope'},
                        {text: '编辑用户', icon: 'fa-edit', className: 'edit-ope'},
                        {text: '代理设置', icon: 'fa-edit', className: 'edit-agency'}
                    ];
                    if (data.status === 'Deactivated') {
                        opts.push({text: '启用用户', className: 'active-opt btn-success'});
                    } else {
                        opts.push({text: '禁用用户', className: 'deactivate-opt btn-warning'});
                    }
                    opts.push({text: '删除用户', icon: 'fa-trash-o', className: 'delete-ope btn-danger'});

                    if (data.openid) {
                        opts.push({text: '发送消息', className: 'send-msg-opt'});
                        opts.push({text: '通过微信更新', className: 'edit-by-wechat-opt'});
                    }

                    if (data.level === 'Partner' || data.level === 'Agency') {
                        opts.push({text: '邀请转粉丝', className: 'agency-change-opt'});
                    } else {
                        opts.push({text: '取消代理转粉', className: 'agency-cancel-opt'});
                    }

                    var content = '';
                    if ((!data.pid) || (!data.qun_pid) || (!data.domain_pid)) {
                        content = '<div class="btn-group"><button type="button" class="btn btn-default">生成Pid</button>' +
                            '<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" style="margin-left: 0px;"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>' +
                            '<ul class="dropdown-menu" role="menu">' +
                            (data.pid ? '' : '<li><a class="add-pid" href="javascript:;" data-value="default">默认Pid</a></li>') +
                            (data.domain_pid ? '' : '<li><a class="add-pid" href="javascript:;" data-value="domain">网站Pid</a></li>') +
                            (data.qun_pid ? '' : '<li><a class="add-pid" href="javascript:;" data-value="qun">群Pid</a></li>') +
                            '</ul></div>';
                    }
                    child(utils.childWrapper(idx, opts, content)).show();
                } else {
                    child.hide();
                }
            });
        });

        //初始化事件
        table.on('draw.dt', toggleHandler).on('click', '.active-opt', utils.tableEvent(table, function (idx, rowData) {
            //启用用户
            return adminApi('users_edit', {
                id: rowData.id,
                status: 'Active'
            }).then(utils.handEdit(table, {idx: idx, name: '用户'}, true, toggleHandler));
        })).on('click', '.deactivate-opt', utils.tableEvent(table, function (idx, rowData) {
            //禁用用户
            return adminApi('users_edit', {
                id: rowData.id,
                status: 'Deactivated'
            }).then(utils.handEdit(table, {idx: idx, name: '用户'}, true, toggleHandler));
        })).on('click', '.image-ope', utils.tableEvent(table, function (idx, rowData) {
            var tools = {
                image: {text: '默认', image: rowData.image},
                banner: {text: '二维码', image: rowData.banner},
                return_qrcode: {text: '返款二维码', image: rowData.return_qrcode},
                join_qrcode: {text: '加入二维码', image: rowData.join_qrcode},
                remove: {text: '删除', className: 'btn-danger'}
            };
            var setImage = function (data) {
                rowData.image = data.image;
                tools.image.image = data.image;
                table.fnUpdate(rowData, idx, undefined, false);
            }
            var setBanner = function (data) {
                rowData.banner = data.image;
                tools.banner.image = data.image;
                table.fnUpdate(rowData, idx, undefined, false);
            }
            var setReturnQrcode = function (data) {
                rowData.return_qrcode = data.image;
                tools.return_qrcode.image = data.image;
                table.fnUpdate(rowData, idx, undefined, false);
            }
            var setJoinQrcode = function (data) {
                rowData.join_qrcode = data.image;
                tools.join_qrcode.image = data.image;
                table.fnUpdate(rowData, idx, undefined, false);
            }
            utils.uploader({
                title: '用户 - ' + (rowData.nickname || rowData.username),
                tools: tools,
                fnImages: function () {
                    return adminApi('users_image_browse', {
                        type: 'UserImage',
                        reference: rowData.id
                    });
                },
                fnHandle: function (data) {
                    data.type = 'UserImage';
                    data.reference = rowData.id;
                    return adminApi('users_image_add', data).then(function (result) {
                        if (result.image) {
                            setImage(result.data);
                        }
                        return result;
                    });
                },
                fnOperate: function (data) {
                    return adminApi('users_image_edit', data).then(function (result) {
                        if (result.success && data.operation === 'image') {
                            setImage(result.data);
                        }
                        if (result.success && data.operation === 'banner') {
                            setBanner(result.data);
                        }
                        if (result.success && data.operation === 'return_qrcode') {
                            setReturnQrcode(result.data);
                        }
                        if (result.success && data.operation === 'join_qrcode') {
                            setJoinQrcode(result.data);
                        }
                        return result;
                    });
                }
            });
        })).on('click', '.edit-ope', utils.tableEvent(table, function (idx, rowData) {
            //编辑用户
            adminApi('users_load', {id: rowData.id}).then(function (data) {
                if ((data.level == 'Agency' || data.level == 'Partner') && (!data.agency_at)) {
                    data.agency_at = moment().format('YYYY-MM-DD')
                }
                utils.formEdit(table, {
                    idx: idx, name: (rowData.nickname || rowData.username), fields: editFields, columns: 6, data: data,
                    datepickers: datepickers,
                    fnServerData: function (paramData) {
                        return adminApi('users_edit', paramData);
                    }
                });
            });
        })).on('click', '.edit-agency', utils.tableEvent(table, function (idx, rowData) {
            //编辑用户
            adminApi('users_load', {id: rowData.id}).then(function (data) {
                adminApi('users_load', {id: rowData.inviter_id}).then(function (inviter) {
                    if (inviter && (inviter.level == 'Agency' || inviter.level == 'Partner')) {
                        if (!data.order_return_scale && !data.inviter_scale && !data.agency_scale) {
                            data.order_return_scale = inviter.order_return_scale;
                            data.inviter_scale = inviter.inviter_scale;
                            data.agency_scale = inviter.agency_scale;
                            data.inviter_agency_scale = inviter.inviter_agency_scale;
                            data.agency_auto_settle = inviter.agency_auto_settle;
                        }
                    }
                    utils.formEdit(table, {
                        idx: idx,
                        name: (rowData.nickname || rowData.username),
                        fields: agencyFields,
                        columns: 6,
                        data: data,
                        fnServerData: function (paramData) {
                            return adminApi('users_edit', paramData);
                        }
                    });
                });
            });
        })).on('click', '.delete-ope', utils.tableEvent(table, function (idx, rowData) {
            //删除用户
            utils.confirmation(this, {
                placement: 'left',
                optName: '删除用户',
                title: '你确定删除用户?',
                fnConfirm: function () {
                    return adminApi('users_delete', {id: rowData.id}).then(utils.handDelete(table, {name: '用户'}));
                }
            });
        })).on('click', '.agency-change-opt', utils.tableEvent(table, function (idx, rowData) {
            //邀请转粉丝
            utils.confirmation(this, {
                placement: 'left',
                optName: '邀请转粉丝',
                title: '确定把邀请用户转换成粉丝?',
                fnConfirm: function () {
                    return adminApi('users_agency_change', {id: rowData.id});
                }
            });
        })).on('click', '.agency-cancel-opt', utils.tableEvent(table, function (idx, rowData) {
            //取消代理转粉
            utils.confirmation(this, {
                placement: 'left',
                optName: '取消代理转粉',
                title: '确定取消代理功能, 粉丝转给上级代理?',
                fnConfirm: function () {
                    return adminApi('users_agency_cancel', {id: rowData.id});
                }
            });
        })).on('click', '.send-msg-opt', utils.tableEvent(table, function (idx, rowData) {
            //发送消息
            utils.confirmation(this, {
                placement: 'top',
                optName: '发送消息',
                title: '发送消息',
                fnConfirm: function () {
                    return adminApi('users_send_msg', {
                        openid: rowData.openid,
                        text: $('#msgText').val()
                    });
                },
                template: '<div class="popover"> <div class="arrow"></div> <h3 class="popover-title">发送消息</h3>' +
                '<div class="popover-form"> <textarea id="msgText" class="form-control"></textarea> </div>' +
                '<div class="popover-content"> <a data-apply="confirmation">Yes</a> <a data-dismiss="confirmation" class="pull-right">No</a> </div> </div>'
            });
        })).on('click', '.edit-by-wechat-opt', utils.tableEvent(table, function (idx, rowData) {
            //更新信息
            utils.confirmation(this, {
                placement: 'top',
                optName: '更新信息',
                title: '确认通过微信更新信息',
                fnConfirm: function () {
                    return adminApi('users_edit_by_wechat', {id: rowData.id});
                }
            });
        })).on('click', '.finances-opt', utils.tableEvent(table, function (idx, rowData) {
            //资金流水
            var html = $(utils.getHtml('form_assign', {title: '资金流水 - ' + rowData.nickname}));
            html.addClass('modal-fullscreen');
            html.modal('show').on('hidden.bs.modal', function (e) {
                html.remove();
            });
            var financesTable = utils.dataTable(html, {
                columns_arrays: [
                    ["id", "#"],
                    ["order_id", "订单号/交易号", false, function (s, t, row) {
                        return '<div>' + (row.order_id || row.payment_no || '') + '</div>';
                    }],
                    ["amount", "金额/费用", false, utils.priceRender()],
                    ["type", "入/出", false, utils.dictRender('finance_type')],
                    ["operation", "操作", false, utils.dictRender('finance_operation')],
                    ["by", "方式", false],
                    ["status", "状态", false, utils.dictRender('finance_status')],
                    ["created_at", "创建时间", false, utils.dateTimeRender()]
                ],
                sorting: [[0, 'desc']],
                fnServerData: function (paramData) {
                    paramData.push({name: 'user_id', value: rowData.id});
                    return adminApi('finances_browse', paramData);
                }
            });
        })).on('click', '.orders-opt', utils.tableEvent(table, function (idx, rowData) {
            //订单列表
            var html = $(utils.getHtml('form_assign', {title: '订单列表 - ' + rowData.nickname}));
            html.addClass('modal-fullscreen');
            html.modal('show').on('hidden.bs.modal', function (e) {
                html.remove();
            });
            var ordersTable = utils.dataTable(html, {
                columns_arrays: [
                    ["id", "#"],
                    ["mediumId", "代理", false, function (i, t, row) {
                        var user = row.agency;
                        if (!user) {
                            return '';
                        }
                        return (user.image ? '<img src="' + user.image + '?imageView2/1/w/150/h/150/q/75"> ' : '') + '<div>' + (user.nickname || user.tel) + '</div><div>「ID:' + (user.id) + '」</div>';
                    }, 'filterable'],
                    ["user_id", "用户", false, function (i, t, row) {
                        var user = row.user;
                        if (!user) {
                            return '';
                        }
                        return (user.image ? '<img src="' + user.image + '?imageView2/1/w/150/h/150/q/75"> ' : '') + '<div>' + (user.nickname || user.tel) + '</div><div>「ID:' + (user.id) + '」</div>' + '<div>订单数: ' + user.order_count + '/' + user.finish_count + '/' + user.sham_count + '&nbsp;&nbsp;金额: ' + user.amount + '/' + user.frozen + '</div>';
                    }, 'filterable'],
                    ["pictUrl", "图片", false, utils.imageRender('')],
                    ["auctionId", "商品名", false, function (i, t, row) {
                        return '<div style="max-width: 160px;">' + (row.auctionTitle || '') + '</div>';
                    }, 'filterable'],
                    ["exNickName", "店铺", false, function (i, t, row) {
                        return '<div style="max-width: 160px;">' + (row.exShopTitle || '') + '</div>';
                    }, 'filterable'],
                    ["payStatus", "状态", false],
                    ["id", "返现状态", false, function (i, t, row) {
                        return '<div style="min-width: 150px;"><div>' + row.taobaoTradeParentId + '</div><div>付款金额:' + row.totalAlipayFeeString + '</div>' +
                            '<div>预估收入:￥' + row.feeString + '/' + row.discountAndSubsidyToString + '%</div>' +
                            '<div>返现状态:' + row.amount_status + '</div>' +
                            '<div>返现金额:<span class="badge" style="background-color: #00a65a!important; cursor: pointer;">￥' + (row.pay_amount || 0) + '</span></div>' +
                            '<div>邀请返现:<span class="badge" style="background-color: #f39c12!important; cursor: pointer;">￥' + (row.inviter_pay_amount || 0) + '</span></div>' +
                            '<div>代理收入:<span class="badge" style="background-color: #3c8dbc!important; cursor: pointer;">￥' + (row.agency_amount || 0 ) + '</span></div>' +
                            '<div>上级收入:<span class="badge" style="background-color: #3c8dbc!important; cursor: pointer;">￥' + (row.inviter_agency_amount || 0 ) + '</span></div>' +
                            '<div>预计收入:<span class="badge" style="background-color: #dd4b39!important; cursor: pointer;">￥' + (row.income || 0) + '</span></div></div>';
                    }],
                    ["mediumId", "媒体", false, function (i, t, row) {
                        return row.mediumName;
                    }, 'filterable'],
                    ["adPositionId", "广告位", false, function (i, t, row) {
                        return row.adPositionName;
                    }, 'filterable'],
                    ["createTime", "下单日期", true, utils.dateTimeRender()],
                    ["created_at", "创建日期", false, utils.dateTimeRender()]
                ],
                sorting: [[0, 'desc']],
                fnServerData: function (paramData) {
                    paramData.push({name: 'user_id', value: rowData.id});
                    return adminApi('orders_browse', paramData);
                }
            });
        })).on('click', '.add-pid', utils.tableEvent(table, function (idx, rowData) {
            //生成pid
            var self = $(this);
            var pidName = self.attr('data-value');
            adminApi('users_alimama_adzones', {id: rowData.id}).then(function (data) {
                if (!data.success) {
                    return utils.fixedAlert('warning', data.message || '获取媒体列表失败');
                }
                var pid_fields_arrays = [
                    ['siteid', 'select', '媒体', false, data.data],
                    ['newadzonename', 'text', '广告位名称']
                ];
                var pidFields = utils.convertFields(pid_fields_arrays);
                utils.formEdit(table, {
                    idx: idx,
                    name: (rowData.nickname || rowData.username) + '-' + self.text(),
                    fields: pidFields,
                    columns: 6,
                    hiddens: [{name: 'pidName', value: pidName}],
                    data: {id: rowData.id, newadzonename: (rowData.nickname || rowData.username) + '_' + pidName},
                    fnServerData: function (paramData) {
                        return adminApi('users_alimama_adzone_create', paramData);
                    }
                });
            });
        }));
    }
});